package itheima.com.MyTree;

import java.util.TreeSet;

public class MyTree {
    public static void main(String[] args) {
        TreeSet<Students> ts = new TreeSet<>();
        Students s1 = new Students("zhangsan",25);
        Students s2 = new Students("lisi",21);
        Students s3 = new Students("wangwu",24);
        Students s4 = new Students("zhaogou",27);

        ts.add(s1);
        ts.add(s2);
        ts.add(s3);
        ts.add(s4);

        System.out.println(ts);
    }
}
